import tinymce from 'tinymce/tinymce'
tinymce.PluginManager.add('docCreate', function (editor) {
  return (
    editor.ui.registry.addNestedMenuItem('docCreate', {
      text: '新建',
      getSubmenuItems: function () {
        return [
          { type: 'menuitem', text: '通用', onAction: function () {} },
          { type: 'menuitem', text: '标准', onAction: function () {} }
        ]
      }
    }),
    {
      getMetadata: function () {
        return {
          name: '新建',
          url: 'http://sfrj.cn'
        }
      }
    }
  )
})
